package com.pxr.oop;

public class Student {
    //属性，成员变量
    /**
     * 学生姓名
     */
    private String stuName;
    /**
     * 学号
     */
    private String stuNum;
    /**
     * 课程
     */
    private String stuCourse;
    /**
     * 成绩
     */
    private double stuSCore;

    //构造方法 ---特殊行为

    //默认构造方法
    public Student(){
        System.out.println("默认构造方法");
    }
    //自定义构造方法
    public Student(String stuName,String stuNum){
        this.stuName = stuName;
        this.stuNum = stuNum;
        System.out.println("2个参数的自定义构造方法");
    }
    //自定义构造方法
    public Student(String stuName,String stuNum,String stuCourse,double stuSCore){
        this.stuName = stuName;
        this.stuNum = stuNum;
        this.stuCourse = stuCourse;
        this.stuSCore = stuSCore;
        System.out.println("4个参数的自定义构造方法");
    }

    // getter/setter 行为接口方法

    public String getStuName(){
        return stuName;
    }

    public void setStuName(){
        this.stuName = stuName;
    }

   public String getStuNum(){
        return stuNum;
   }

   public void setStuNum(){
        this.stuNum = stuNum;
   }

    public String getStuCourse() {
        return stuCourse;
    }

    public void setStuCourse(String stuCourse) {
        this.stuCourse = stuCourse;
    }

    public double getStuSCore() {
        return stuSCore;
    }

    public void setStuSCore(double stuSCore) {
        this.stuSCore = stuSCore;
    }

    /**
     * 学习行为
     */
    public void doStudy() {
        String stuName = "李四";
        System.out.println(stuName + "is studying...");
        System.out.println(this.stuName + "is studying...");
    }
}
